home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4799 < prev    next >
Mailbox/MIME Entity  |  1996-08-06  |  1.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 6c 61 6e 67 2e 63 2b | 2b 0a 50 61 74 68 3a 20 |.lang.c+|+.Path: |
|00000020| 6e 65 77 73 2e 6e 65 72 | 2e 62 62 6e 70 6c 61 6e |news.ner|.bbnplan|
|00000030| 65 74 2e 6e 65 74 21 61 | 72 63 6f 21 75 73 65 6e |et.net!a|rco!usen|
|00000040| 65 74 0a 46 72 6f 6d 3a | 20 42 72 69 61 6e 20 4c |et.From:| Brian L|
|00000050| 65 61 63 68 20 3c 6c 61 | 73 62 66 6c 3e 0a 53 75 |each <la|sbfl>.Su|
|00000060| 62 6a 65 63 74 3a 20 52 | 65 3a 20 55 4e 49 58 20 |bject: R|e: UNIX |
|00000070| 74 6f 20 50 43 20 2d 20 | 77 68 61 74 20 61 72 65 |to PC - |what are|
|00000080| 20 74 68 65 73 65 20 3f | 3f 3f 0a 58 2d 4e 6e 74 | these ?|??.X-Nnt|
|00000090| 70 2d 50 6f 73 74 69 6e | 67 2d 48 6f 73 74 3a 20 |p-Postin|g-Host: |
|000000a0| 31 33 36 2e 32 32 36 2e | 31 31 36 2e 31 0a 43 6f |136.226.|116.1.Co|
|000000b0| 6e 74 65 6e 74 2d 54 79 | 70 65 3a 20 74 65 78 74 |ntent-Ty|pe: text|
|000000c0| 2f 70 6c 61 69 6e 3b 20 | 63 68 61 72 73 65 74 3d |/plain; |charset=|
|000000d0| 75 73 2d 61 73 63 69 69 | 0a 4d 65 73 73 61 67 65 |us-ascii|.Message|
|000000e0| 2d 49 44 3a 20 3c 44 4d | 32 4d 39 4c 2e 39 41 73 |-ID: <DM|2M9L.9As|
|000000f0| 40 6e 65 77 73 2e 61 72 | 63 6f 2e 63 6f 6d 3e 0a |@news.ar|co.com>.|
|00000100| 54 6f 3a 20 4a 2e 42 69 | 64 64 69 73 63 6f 6d 62 |To: J.Bi|ddiscomb|
|00000110| 65 40 72 6c 2e 61 63 2e | 75 6b 0a 53 65 6e 64 65 |e@rl.ac.|uk.Sende|
|00000120| 72 3a 20 75 73 65 6e 65 | 74 40 6e 65 77 73 2e 61 |r: usene|t@news.a|
|00000130| 72 63 6f 2e 63 6f 6d 0a | 43 6f 6e 74 65 6e 74 2d |rco.com.|Content-|
|00000140| 54 72 61 6e 73 66 65 72 | 2d 45 6e 63 6f 64 69 6e |Transfer|-Encodin|
|00000150| 67 3a 20 37 62 69 74 0a | 4f 72 67 61 6e 69 7a 61 |g: 7bit.|Organiza|
|00000160| 74 69 6f 6e 3a 20 41 52 | 43 4f 20 4f 69 6c 20 25 |tion: AR|CO Oil %|
|00000170| 20 47 61 73 20 43 6f 6d | 70 61 6e 79 0a 52 65 66 | Gas Com|pany.Ref|
|00000180| 65 72 65 6e 63 65 73 3a | 20 3c 33 31 30 46 37 37 |erences:| <310F77|
|00000190| 39 42 2e 36 38 45 43 40 | 72 6c 2e 61 63 2e 75 6b |9B.68EC@|rl.ac.uk|
|000001a0| 3e 0a 4d 69 6d 65 2d 56 | 65 72 73 69 6f 6e 3a 20 |>.Mime-V|ersion: |
|000001b0| 31 2e 30 0a 44 61 74 65 | 3a 20 54 68 75 2c 20 31 |1.0.Date|: Thu, 1|
|000001c0| 20 46 65 62 20 31 39 39 | 36 20 30 30 3a 32 30 3a | Feb 199|6 00:20:|
|000001d0| 30 39 20 47 4d 54 0a 58 | 2d 4d 61 69 6c 65 72 3a |09 GMT.X|-Mailer:|
|000001e0| 20 4d 6f 7a 69 6c 6c 61 | 20 31 2e 31 32 20 28 58 | Mozilla| 1.12 (X|
|000001f0| 31 31 3b 20 49 3b 20 48 | 50 2d 55 58 20 41 2e 30 |11; I; H|P-UX A.0|
|00000200| 39 2e 30 35 20 39 30 30 | 30 2f 37 35 35 29 0a 58 |9.05 900|0/755).X|
|00000210| 2d 55 72 6c 3a 20 6e 65 | 77 73 3a 33 31 30 46 37 |-Url: ne|ws:310F7|
|00000220| 37 39 42 2e 36 38 45 43 | 40 72 6c 2e 61 63 2e 75 |79B.68EC|@rl.ac.u|
|00000230| 6b 0a 0a 54 68 65 20 4c | 6f 72 64 20 6f 66 20 44 |k..The L|ord of D|
|00000240| 61 72 6b 6e 65 73 73 20 | 3c 4a 2e 42 69 64 64 69 |arkness |<J.Biddi|
|00000250| 73 63 6f 6d 62 65 40 72 | 6c 2e 61 63 2e 75 6b 3e |scombe@r|l.ac.uk>|
|00000260| 20 77 72 6f 74 65 3a 0a | 3e 49 27 6d 20 61 74 74 | wrote:.|>I'm att|
|00000270| 65 6d 70 74 69 6e 67 20 | 74 6f 20 63 6f 6e 76 65 |empting |to conve|
|00000280| 72 74 20 73 6f 6d 65 20 | 63 6f 64 65 20 77 72 69 |rt some |code wri|
|00000290| 74 74 65 6e 20 62 79 20 | 73 6f 6d 65 6f 6e 65 20 |tten by |someone |
|000002a0| 65 6c 73 65 2c 20 73 6f | 6d 65 20 74 69 6d 65 20 |else, so|me time |
|000002b0| 61 67 6f 2c 0a 3e 44 6f | 65 73 20 61 6e 79 6f 6e |ago,.>Do|es anyon|
|000002c0| 65 20 6b 6e 6f 77 20 68 | 6f 77 20 49 20 63 61 6e |e know h|ow I can|
|000002d0| 20 61 63 63 65 73 73 20 | 74 68 65 73 65 20 66 75 | access |these fu|
|000002e0| 6e 63 74 69 6f 6e 73 20 | 6f 72 20 65 71 75 69 76 |nctions |or equiv|
|000002f0| 61 6c 65 6e 74 20 6f 6e | 20 74 68 65 20 50 43 20 |alent on| the PC |
|00000300| 28 42 43 2b 2b 34 2e 35 | 32 29 0a 3e 0a 3e 69 66 |(BC++4.5|2).>.>if|
|00000310| 20 28 69 73 69 6e 66 28 | 64 29 29 20 72 65 74 75 | (isinf(|d)) retu|
|00000320| 72 6e 20 30 3b 20 0a 3e | 69 73 69 6e 66 20 3f 3f |rn 0; .>|isinf ??|
|00000330| 3f 0a 3e 0a 3e 69 66 20 | 28 69 73 6e 61 6e 28 49 |?.>.>if |(isnan(I|
|00000340| 2e 78 29 29 20 63 6f 6e | 74 69 6e 75 65 3b 0a 3e |.x)) con|tinue;.>|
|00000350| 6e 6f 74 20 61 20 6e 75 | 6d 62 65 72 20 0a 3e 0a |not a nu|mber .>.|
|00000360| 3e 64 6f 75 62 6c 65 20 | 64 20 3d 20 69 6e 66 69 |>double |d = infi|
|00000370| 6e 69 74 79 28 29 3b 0a | 3e 69 6e 66 69 6e 69 74 |nity();.|>infinit|
|00000380| 79 0a 3e 0a 3e 50 32 2e | 78 20 3d 20 50 2e 78 20 |y.>.>P2.|x = P.x |
|00000390| 2b 20 31 2b 28 64 72 61 | 6e 64 34 38 28 29 2a 31 |+ 1+(dra|nd48()*1|
|000003a0| 30 29 3b 0a 3e 73 6f 6d | 65 20 72 61 6e 64 6f 6d |0);.>som|e random|
|000003b0| 20 66 75 6e 63 74 69 6f | 6e 2e 0a 3e 0a 3e 49 66 | functio|n..>.>If|
|000003c0| 20 79 6f 75 20 63 61 6e | 20 68 65 6c 70 2c 20 74 | you can| help, t|
|000003d0| 68 65 6e 20 74 68 61 6e | 6b 73 20 76 65 72 79 20 |hen than|ks very |
|000003e0| 6d 75 63 68 2c 20 61 6e | 64 20 63 6f 75 6c 64 20 |much, an|d could |
|000003f0| 79 6f 75 20 70 6c 65 61 | 73 65 20 6d 61 69 6c 20 |you plea|se mail |
|00000400| 61 73 20 77 65 6c 6c 20 | 61 73 20 70 6f 73 74 20 |as well |as post |
|00000410| 61 20 72 65 70 6c 79 2e | 0a 3e 0a 3e 54 68 61 6e |a reply.|.>.>Than|
|00000420| 6b 73 0a 3e 0a 3e 4a 6f | 68 6e 20 42 0a 0a 0a 69 |ks.>.>Jo|hn B...i|
|00000430| 73 69 6e 66 28 29 20 69 | 73 20 61 20 66 75 6e 63 |sinf() i|s a func|
|00000440| 74 69 6f 6e 20 77 68 69 | 63 68 20 74 65 73 74 73 |tion whi|ch tests|
|00000450| 20 74 6f 20 73 65 65 20 | 69 66 20 74 68 65 20 64 | to see |if the d|
|00000460| 6f 75 62 6c 65 20 70 72 | 65 63 69 73 69 6f 6e 20 |ouble pr|ecision |
|00000470| 61 72 67 75 6d 65 6e 74 | 20 69 73 20 61 6e 0a 49 |argument| is an.I|
|00000480| 45 45 45 20 69 6e 66 69 | 6e 69 74 79 20 76 61 6c |EEE infi|nity val|
|00000490| 75 65 2e 20 49 74 20 72 | 65 74 75 72 6e 73 20 61 |ue. It r|eturns a|
|000004a0| 20 70 6f 73 69 74 69 76 | 65 20 69 6e 74 65 67 65 | positiv|e intege|
|000004b0| 72 20 69 66 20 74 68 65 | 20 61 72 67 75 6d 65 6e |r if the| argumen|
|000004c0| 74 20 69 73 20 70 6f 73 | 69 74 69 76 65 0a 69 6e |t is pos|itive.in|
|000004d0| 69 66 69 6e 69 74 79 2c | 20 61 20 6e 65 67 61 74 |ifinity,| a negat|
|000004e0| 69 76 65 20 76 61 6c 75 | 65 20 69 66 20 74 68 65 |ive valu|e if the|
|000004f0| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 6e 65 67 | argumen|t is neg|
|00000500| 61 74 69 76 65 20 69 6e | 69 66 69 6e 69 74 79 2c |ative in|ifinity,|
|00000510| 20 61 6e 64 20 30 20 69 | 66 20 74 68 65 0a 76 61 | and 0 i|f the.va|
|00000520| 6c 75 65 20 69 73 20 6e | 6f 74 20 69 6e 66 69 6e |lue is n|ot infin|
|00000530| 69 74 79 2e 0a 0a 69 73 | 6e 61 6e 28 29 20 72 65 |ity...is|nan() re|
|00000540| 74 75 72 6e 73 20 6e 6f | 6e 2d 7a 65 72 6f 20 69 |turns no|n-zero i|
|00000550| 66 20 74 68 65 20 64 6f | 75 62 6c 65 20 70 72 65 |f the do|uble pre|
|00000560| 63 69 73 69 6f 6e 20 61 | 72 67 75 6d 65 6e 74 20 |cision a|rgument |
|00000570| 63 6f 6e 74 61 69 6e 73 | 20 6f 6e 65 20 6f 66 20 |contains| one of |
|00000580| 74 68 65 0a 49 45 45 45 | 20 6e 6f 74 2d 61 2d 6e |the.IEEE| not-a-n|
|00000590| 75 6d 62 65 72 20 76 61 | 6c 75 65 73 2e 0a 0a 69 |umber va|lues...i|
|000005a0| 6e 66 69 6e 69 74 79 28 | 29 20 69 73 20 6e 6f 74 |nfinity(|) is not|
|000005b0| 20 6f 6e 20 6d 79 20 6d | 61 63 68 69 6e 65 2c 20 | on my m|achine, |
|000005c0| 62 75 74 20 49 20 73 75 | 73 70 65 63 74 20 69 74 |but I su|spect it|
|000005d0| 20 72 65 74 75 72 6e 73 | 20 61 6e 20 69 6e 66 69 | returns| an infi|
|000005e0| 6e 69 74 65 20 76 61 6c | 75 65 20 66 6f 72 0a 61 |nite val|ue for.a|
|000005f0| 73 73 69 67 6e 61 74 69 | 6f 6e 2e 20 59 6f 75 20 |ssignati|on. You |
|00000600| 63 6f 75 6c 64 20 77 72 | 69 74 65 20 74 68 65 20 |could wr|ite the |
|00000610| 66 75 6e 63 74 69 6f 6e | 20 61 73 3a 0a 0a 64 6f |function| as:..do|
|00000620| 75 62 6c 65 20 69 6e 66 | 69 6e 69 74 79 28 29 20 |uble inf|inity() |
|00000630| 7b 20 72 65 74 75 72 6e | 20 28 64 6f 75 62 6c 65 |{ return| (double|
|00000640| 29 31 2e 30 2f 28 64 6f | 75 62 6c 65 29 20 30 2e |)1.0/(do|uble) 0.|
|00000650| 30 3b 20 7d 3b 0a 0a 49 | 20 64 6f 6e 27 74 20 68 |0; };..I| don't h|
|00000660| 61 76 65 20 64 72 61 6e | 64 28 29 2c 20 62 75 74 |ave dran|d(), but|
|00000670| 20 49 20 64 6f 20 68 61 | 76 65 20 64 72 61 6e 64 | I do ha|ve drand|
|00000680| 34 38 28 29 2c 20 77 68 | 69 63 68 20 22 72 65 74 |48(), wh|ich "ret|
|00000690| 75 72 6e 73 20 61 20 6e | 6f 6e 2d 6e 65 67 61 74 |urns a n|on-negat|
|000006a0| 69 76 65 0a 64 6f 75 62 | 6c 65 2d 70 72 65 63 69 |ive.doub|le-preci|
|000006b0| 73 69 6f 6e 20 66 6c 6f | 61 74 69 6e 67 2d 70 6f |sion flo|ating-po|
|000006c0| 69 6e 74 20 76 61 6c 75 | 65 73 20 75 6e 69 66 6f |int valu|es unifo|
|000006d0| 72 6d 6c 79 20 64 69 73 | 74 72 69 62 75 74 65 64 |rmly dis|tributed|
|000006e0| 20 6f 76 65 72 20 74 68 | 65 20 69 6e 74 65 72 76 | over th|e interv|
|000006f0| 61 6c 0a 5b 30 2e 30 2c | 20 31 2e 30 29 2e 22 20 |al.[0.0,| 1.0)." |
|00000700| 4f 6e 20 6d 79 20 6d 61 | 63 68 69 6e 65 2c 20 64 |On my ma|chine, d|
|00000710| 72 61 6e 64 34 38 20 64 | 6f 65 73 20 6e 6f 74 20 |rand48 d|oes not |
|00000720| 74 61 6b 65 20 61 6e 20 | 61 72 67 75 6d 65 6e 74 |take an |argument|
|00000730| 2e 0a 0a 2d 42 72 69 61 | 6e 20 3a 2d 29 0a 0a |...-Bria|n :-).. |
+--------+-------------------------+-------------------------+--------+--------+